﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmTipoDocumentoConsulta.aspx.cs" Inherits="frmTipoDocumentoBaja" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p> &nbsp;<h1>Tipos de Documentos</h1>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="idTipoDocumento" DataSourceID="SqlDataSource1" 
        EmptyDataText="No hay registros de datos para mostrar." AllowPaging="True" 
        AllowSorting="True">
        <Columns>
            <asp:BoundField DataField="descripcionTipoDocumento" 
                HeaderText="Descripcion" 
                SortExpression="descripcionTipoDocumento" />
            <asp:CommandField HeaderText="Acciones" ShowDeleteButton="True" 
                ShowEditButton="True" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        DeleteCommand="DELETE FROM [T_TipoDoc] WHERE [idTipoDocumento] = @idTipoDocumento" 
        InsertCommand="INSERT INTO [T_TipoDoc] ([descripcionTipoDocumento]) VALUES (@descripcionTipoDocumento)" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [idTipoDocumento], [descripcionTipoDocumento] FROM [T_TipoDoc]" 
        
        
        UpdateCommand="UPDATE [T_TipoDoc] SET [descripcionTipoDocumento] = @descripcionTipoDocumento WHERE [idTipoDocumento] = @idTipoDocumento">
        <InsertParameters>
            <asp:Parameter Name="descripcionTipoDocumento" Type="String" />
        </InsertParameters>
        <DeleteParameters>
            <asp:Parameter Name="idTipoDocumento" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="descripcionTipoDocumento" Type="String" />
            <asp:Parameter Name="idTipoDocumento" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</p>
    <br />
    <asp:Button ID="Button2" runat="server" Height="29px" onclick="Button2_Click" 
        Text="Regresar" Width="130px" />
    </p>
</asp:Content>

